#include <pybind11/pybind11.h>
#include <iostream>
#include <calculator.h>
#include <pybind11/stl.h>
#include <pybind11/complex.h>
#include <pybind11/functional.h>
#include <pybind11/chrono.h>

namespace py = pybind11;

int add(int i, int j) {
	return i + j;
}

const char* helloworld()
{
	return "hello world";
}
int  h()
{
	return 9999;
}
PYBIND11_MODULE(example3, m) {
	m.doc() = "pybind11 engine plugin"; // optional module docstring
	m.def("add", &add, "A function which adds two numbers");
	m.def("hello", &helloworld, "hello world");
	m.def("h9", &h, "h");

	py::class_<calculator>(m, "calculator")
		.def(py::init())
		.def_property("name", &calculator::getName, &calculator::setName)
		.def("setName", &calculator::setName)
		.def("getName", &calculator::getName)
		.def("add", &calculator::add)
		.def("sub", &calculator::sub)
		.def("mult", &calculator::mult)
		.def("div", &calculator::div)
		.def("registerCallBack", &calculator::registerCallBack);
}
